<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Make Controller Kit - Firmware API: Debug</title>
<link href="mt_doxygen.css" rel="stylesheet" type="text/css" />
<link href="../resources/mt_doxytabs.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.header {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12pt;
	color: #222222;
}
-->
</style>
</head>

<body>
<table width="800" border="0">
    <tr>
      <td colspan="3">
        <form method="get" action="http://www.google.com/search">
          <div align="right">
            <input type="text"   name="q" size="25"
              maxlength="255" value="" />
            <input type="submit" value="Search" />
            <input type="hidden" name="sitesearch" value="makingthings.com/ref/firmware/html" />
          </div>
        </form>
       </td>
    </tr>
    <tr>
      <td><div align="center"><a href="http://www.makingthings.com">
				<img src="../resources/logo_brown_medium.png" alt="MakingThings"
									width="200" height="78" border="0" align="middle" longdesc="http://www.makingthings.com" /></a></div></td>
				<td><div align="center" class="header">
      		Make Controller Kit <br />
          Firmware API
      </div></td>
      <td><div align="center"><a href="http://www.makezine.com">
					<img src="../resources/make_logo.png" alt="MAKE Zine" 
										width="164" height="73" border="0" align="middle" longdesc="http://www.makezine.com" /></a></div></td>
    </tr>
</table>
</body>
</html>
<!-- Generated by Doxygen 1.5.4 -->
<script type="text/javascript">
<!--
function changeDisplayState (e){
  var num=this.id.replace(/[^[0-9]/g,'');
  var button=this.firstChild;
  var sectionDiv=document.getElementById('dynsection'+num);
  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
    sectionDiv.style.display='block';
    button.src='open.gif';
  }else{
    sectionDiv.style.display='none';
    button.src='closed.gif';
  }
}
function initDynSections(){
  var divs=document.getElementsByTagName('div');
  var sectionCounter=1;
  for(var i=0;i<divs.length-1;i++){
    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
      var header=divs[i];
      var section=divs[i+1];
      var button=header.firstChild;
      if (button!='IMG'){
        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
        button=document.createElement('img');
        divs[i].insertBefore(button,divs[i].firstChild);
      }
      header.style.cursor='pointer';
      header.onclick=changeDisplayState;
      header.id='dynheader'+sectionCounter;
      button.src='closed.gif';
      section.id='dynsection'+sectionCounter;
      section.style.display='none';
      section.style.marginLeft='14px';
      sectionCounter++;
    }
  }
}
window.onload = initDynSections;
-->
</script>
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<h1>Debug<br>
<small>
[<a class="el" href="group___controller.html">Controller</a>]</small>
</h1>The Debug subsystem offers a simple way to send debug messages back from the MAKE Controller via OSC.  
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___debug.html#g342d23c56449a204317613c577d156ae">DEBUG_ALWAYS</a>&nbsp;&nbsp;&nbsp;0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The lowest debug level, used for messages that should go out no matter what.  <a href="#g342d23c56449a204317613c577d156ae"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___debug.html#g49bce9dafa991fde5616257caa9e3c4a">DEBUG_ERROR</a>&nbsp;&nbsp;&nbsp;1</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used for critical/fatal error messages.  <a href="#g49bce9dafa991fde5616257caa9e3c4a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___debug.html#g8a4e4885193c12b840ff3cbedec2451d">DEBUG_WARNING</a>&nbsp;&nbsp;&nbsp;2</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used for warnings.  <a href="#g8a4e4885193c12b840ff3cbedec2451d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___debug.html#ge8523807c48236b849d94507b9eae38f">DEBUG_MESSAGE</a>&nbsp;&nbsp;&nbsp;3</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used for normal/test messages.  <a href="#ge8523807c48236b849d94507b9eae38f"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___debug.html#ga064859b9d698661239260fc7ae4b788">Debug_SetActive</a> (int state)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets whether the Debug subsystem is active.  <a href="#ga064859b9d698661239260fc7ae4b788"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___debug.html#gb01e4ab7a088fd347436b32c0d0289af">Debug_GetActive</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the active state of the Debug subsystem.  <a href="#gb01e4ab7a088fd347436b32c0d0289af"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___debug.html#gaabc49f1a610be9aa9965a48fd1a3598">Debug_SetLevel</a> (int level)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the debug level.  <a href="#gaabc49f1a610be9aa9965a48fd1a3598"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___debug.html#ga85d6c6d14873ce098a225bf5aab08ab">Debug_GetLevel</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read the current debugger level.  <a href="#ga85d6c6d14873ce098a225bf5aab08ab"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___debug.html#g699ec173477cc72845e9c35d9c521dcb">Debug_SetUsb</a> (int state)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets whether the Debug subsystem outputs its OSC messages via USB.  <a href="#g699ec173477cc72845e9c35d9c521dcb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___debug.html#g8e1adc47649ad13736bd7e453608f4e6">Debug_GetUsb</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns whether the Debug system is set to send its messages over USB.  <a href="#g8e1adc47649ad13736bd7e453608f4e6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___debug.html#gddf4b54fc8fec7379b39dca13db2f309">Debug_SetUdp</a> (int state)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets whether the Debug system is set to send its messages over UDP.  <a href="#gddf4b54fc8fec7379b39dca13db2f309"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___debug.html#g220f51e83f05db634d48ea79cd58a174">Debug_GetUdp</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets whether the Debug subsystem outputs its OSC messages via USB.  <a href="#g220f51e83f05db634d48ea79cd58a174"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___debug.html#g17dd929959ff7576dbccb05e4b69a012">Debug</a> (int level, char *format,...)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a debug message.  <a href="#g17dd929959ff7576dbccb05e4b69a012"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The Debug subsystem offers a simple way to send debug messages back from the MAKE Controller via OSC. 
<p>
Even without single-stepping through the code running on the MAKE Controller, it is still easy to get helpful debug information about the program through the Debug subsystem.<p>
Specify the level of each debug message and then, in a debug session, set the level you would like to see. More frequent and lower level messages can be filtered out in a debug session by setting the debug level a bit higher to let through only the messages you're interested in.<p>
Possible levels are:<ul>
<li>0 - Always send</li><li>1 - Error messages</li><li>2 - Warning messages</li><li>3 - Normal/test messages </li></ul>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="g342d23c56449a204317613c577d156ae"></a><!-- doxytag: member="debug.h::DEBUG_ALWAYS" ref="g342d23c56449a204317613c577d156ae" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DEBUG_ALWAYS&nbsp;&nbsp;&nbsp;0          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The lowest debug level, used for messages that should go out no matter what. 
<p>

<p>Definition at line <a class="el" href="debug_8h-source.html#l00031">31</a> of file <a class="el" href="debug_8h-source.html">debug.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="g49bce9dafa991fde5616257caa9e3c4a"></a><!-- doxytag: member="debug.h::DEBUG_ERROR" ref="g49bce9dafa991fde5616257caa9e3c4a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DEBUG_ERROR&nbsp;&nbsp;&nbsp;1          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Used for critical/fatal error messages. 
<p>

<p>Definition at line <a class="el" href="debug_8h-source.html#l00032">32</a> of file <a class="el" href="debug_8h-source.html">debug.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="ge8523807c48236b849d94507b9eae38f"></a><!-- doxytag: member="debug.h::DEBUG_MESSAGE" ref="ge8523807c48236b849d94507b9eae38f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DEBUG_MESSAGE&nbsp;&nbsp;&nbsp;3          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Used for normal/test messages. 
<p>

<p>Definition at line <a class="el" href="debug_8h-source.html#l00034">34</a> of file <a class="el" href="debug_8h-source.html">debug.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="g8a4e4885193c12b840ff3cbedec2451d"></a><!-- doxytag: member="debug.h::DEBUG_WARNING" ref="g8a4e4885193c12b840ff3cbedec2451d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DEBUG_WARNING&nbsp;&nbsp;&nbsp;2          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Used for warnings. 
<p>

<p>Definition at line <a class="el" href="debug_8h-source.html#l00033">33</a> of file <a class="el" href="debug_8h-source.html">debug.h</a>.</p>

</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="g17dd929959ff7576dbccb05e4b69a012"></a><!-- doxytag: member="debugosc.c::Debug" ref="g17dd929959ff7576dbccb05e4b69a012" args="(int level, char *format,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Debug           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>level</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create a debug message. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>level</em>&nbsp;</td><td>An integer specifying the debug level. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>format</em>&nbsp;</td><td>printf()-style formatting. d, s, x, etc. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>...</em>&nbsp;</td><td>The contents of the debug message - this can look just like a call to printf().</td></tr>
  </table>
</dl>
<dl class="user" compact><dt><b>Example</b></dt><dd><div class="fragment"><pre class="fragment">  <span class="comment">// send a simple debug message...</span>
  <a class="code" href="group___debug.html#g17dd929959ff7576dbccb05e4b69a012" title="Create a debug message.">Debug</a>( <a class="code" href="group___debug.html#ge8523807c48236b849d94507b9eae38f" title="Used for normal/test messages.">DEBUG_MESSAGE</a>, <span class="stringliteral">"%s"</span>, <span class="stringliteral">"Hello."</span> );

  <span class="comment">// or a slightly more interesting message</span>
  SomeTask( <span class="keywordtype">void</span>* p )
  {
    <span class="keywordtype">int</span> counter = 0;
    <span class="keywordflow">while</span>( 1 )
    {
      <a class="code" href="group___debug.html#g17dd929959ff7576dbccb05e4b69a012" title="Create a debug message.">Debug</a>( <a class="code" href="group___debug.html#ge8523807c48236b849d94507b9eae38f" title="Used for normal/test messages.">DEBUG_MESSAGE</a>, <span class="stringliteral">"%s %d"</span>, <span class="stringliteral">"Current count is: "</span>, counter++ );
      <a class="code" href="group___tasks.html#g9a64a7c0e24f257826103d1d1bbb44fa" title="Put a task to sleep for a given number of milliseconds.">Sleep</a>( 1000 );
    }
  }
</pre></div></dd></dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd></dd></dl>

<p>Definition at line <a class="el" href="debugosc_8c-source.html#l00267">267</a> of file <a class="el" href="debugosc_8c-source.html">debugosc.c</a>.</p>

</div>
</div><p>
<a class="anchor" name="gb01e4ab7a088fd347436b32c0d0289af"></a><!-- doxytag: member="debugosc.c::Debug_GetActive" ref="gb01e4ab7a088fd347436b32c0d0289af" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Debug_GetActive           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the active state of the Debug subsystem. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>State - 1 (active) or 0 (inactive).</dd></dl>
<dl class="user" compact><dt><b>Example</b></dt><dd><div class="fragment"><pre class="fragment">  <span class="comment">// Check to see if we're active...</span>
  <span class="keywordtype">int</span> active = <a class="code" href="group___debug.html#gb01e4ab7a088fd347436b32c0d0289af" title="Returns the active state of the Debug subsystem.">Debug_GetActive</a>();
  <span class="keywordflow">if</span>( active )
    <span class="comment">// then do something...</span>
</pre></div> </dd></dl>

<p>Definition at line <a class="el" href="debugosc_8c-source.html#l00107">107</a> of file <a class="el" href="debugosc_8c-source.html">debugosc.c</a>.</p>

</div>
</div><p>
<a class="anchor" name="ga85d6c6d14873ce098a225bf5aab08ab"></a><!-- doxytag: member="debugosc.c::Debug_GetLevel" ref="ga85d6c6d14873ce098a225bf5aab08ab" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Debug_GetLevel           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Read the current debugger level. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Level An integer from 0-3 specifying the level.</dd></dl>
<dl class="user" compact><dt><b>Example</b></dt><dd><div class="fragment"><pre class="fragment">  <span class="comment">// Check the current debug level</span>
  <span class="keywordtype">int</span> level = <a class="code" href="group___debug.html#ga85d6c6d14873ce098a225bf5aab08ab" title="Read the current debugger level.">Debug_GetLevel</a>( );
  <span class="keywordflow">switch</span>( level )
  {
    <span class="keywordflow">case</span> <a class="code" href="group___debug.html#g342d23c56449a204317613c577d156ae" title="The lowest debug level, used for messages that should go out no matter what.">DEBUG_ALWAYS</a>:
      <span class="comment">// ...</span>
      <span class="keywordflow">break</span>;
    <span class="keywordflow">case</span> <a class="code" href="group___debug.html#g49bce9dafa991fde5616257caa9e3c4a" title="Used for critical/fatal error messages.">DEBUG_ERROR</a>:
      <span class="comment">// ...</span>
      <span class="keywordflow">break</span>;
    <span class="keywordflow">case</span> <a class="code" href="group___debug.html#g8a4e4885193c12b840ff3cbedec2451d" title="Used for warnings.">DEBUG_WARNING</a>:
      <span class="comment">// ...</span>
      <span class="keywordflow">break</span>;
    <span class="keywordflow">case</span> <a class="code" href="group___debug.html#ge8523807c48236b849d94507b9eae38f" title="Used for normal/test messages.">DEBUG_MESSAGE</a>:
      <span class="comment">// ...</span>
      <span class="keywordflow">break</span>;
  }
</pre></div> </dd></dl>

<p>Definition at line <a class="el" href="debugosc_8c-source.html#l00157">157</a> of file <a class="el" href="debugosc_8c-source.html">debugosc.c</a>.</p>

</div>
</div><p>
<a class="anchor" name="g220f51e83f05db634d48ea79cd58a174"></a><!-- doxytag: member="debugosc.c::Debug_GetUdp" ref="g220f51e83f05db634d48ea79cd58a174" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Debug_GetUdp           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets whether the Debug subsystem outputs its OSC messages via USB. 
<p>
This is enabled by default. <dl class="return" compact><dt><b>Returns:</b></dt><dd>state An integer specifying whether messages will be sent over USB - 1 (enabled) or 0 (disabled).</dd></dl>
<dl class="user" compact><dt><b>Example</b></dt><dd><div class="fragment"><pre class="fragment">  <span class="comment">// Check whether we're sending Debug messages over UDP</span>
  <span class="keywordtype">int</span> udp_debug = <a class="code" href="group___debug.html#g220f51e83f05db634d48ea79cd58a174" title="Sets whether the Debug subsystem outputs its OSC messages via USB.">Debug_GetUdp</a>( );
</pre></div> </dd></dl>

<p>Definition at line <a class="el" href="debugosc_8c-source.html#l00233">233</a> of file <a class="el" href="debugosc_8c-source.html">debugosc.c</a>.</p>

</div>
</div><p>
<a class="anchor" name="g8e1adc47649ad13736bd7e453608f4e6"></a><!-- doxytag: member="debugosc.c::Debug_GetUsb" ref="g8e1adc47649ad13736bd7e453608f4e6" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Debug_GetUsb           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns whether the Debug system is set to send its messages over USB. 
<p>
This is enabled by default. <dl class="return" compact><dt><b>Returns:</b></dt><dd>state An integer specifying whether messages will be sent over USB - 1 (enabled) or 0 (disabled).</dd></dl>
<dl class="user" compact><dt><b>Example</b></dt><dd><div class="fragment"><pre class="fragment">  <span class="comment">// Check whether we're sending Debug messages over USB</span>
  <span class="keywordtype">int</span> usb_debug = <a class="code" href="group___debug.html#g8e1adc47649ad13736bd7e453608f4e6" title="Returns whether the Debug system is set to send its messages over USB.">Debug_GetUsb</a>( );
</pre></div> </dd></dl>

<p>Definition at line <a class="el" href="debugosc_8c-source.html#l00195">195</a> of file <a class="el" href="debugosc_8c-source.html">debugosc.c</a>.</p>

</div>
</div><p>
<a class="anchor" name="ga064859b9d698661239260fc7ae4b788"></a><!-- doxytag: member="debugosc.c::Debug_SetActive" ref="ga064859b9d698661239260fc7ae4b788" args="(int state)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Debug_SetActive           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>state</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets whether the Debug subsystem is active. 
<p>
The Debug system is automatically set to active by making a call to any Debug system function, so you don't typically have to worry about doing that. But, you can set it to inactive to recover a bit of space on the heap. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>state</em>&nbsp;</td><td>An integer specifying the active state - 1 (active) or 0 (inactive). </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Zero on success.</dd></dl>
<dl class="user" compact><dt><b>Example</b></dt><dd><div class="fragment"><pre class="fragment">  <span class="comment">// Checking the debug level sets the system to active.</span>
  <span class="keywordtype">int</span> level = <a class="code" href="group___debug.html#ga85d6c6d14873ce098a225bf5aab08ab" title="Read the current debugger level.">Debug_GetLevel</a>();
  <span class="comment">// then we can turn it off</span>
  <a class="code" href="group___debug.html#ga064859b9d698661239260fc7ae4b788" title="Sets whether the Debug subsystem is active.">Debug_SetActive</a>( 0 );
</pre></div> </dd></dl>

<p>Definition at line <a class="el" href="debugosc_8c-source.html#l00078">78</a> of file <a class="el" href="debugosc_8c-source.html">debugosc.c</a>.</p>

</div>
</div><p>
<a class="anchor" name="gaabc49f1a610be9aa9965a48fd1a3598"></a><!-- doxytag: member="debugosc.c::Debug_SetLevel" ref="gaabc49f1a610be9aa9965a48fd1a3598" args="(int level)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Debug_SetLevel           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>level</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the debug level. 
<p>
Set to a lower number to get more messages. Default level is 3. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>level</em>&nbsp;</td><td>An integer specifying the level (from 0-3). </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success</dd></dl>
<dl class="user" compact><dt><b>Example</b></dt><dd><div class="fragment"><pre class="fragment">  <span class="comment">// Set the level to just report error messages.</span>
  <a class="code" href="group___debug.html#gaabc49f1a610be9aa9965a48fd1a3598" title="Sets the debug level.">Debug_SetLevel</a>( 1 );
</pre></div> </dd></dl>

<p>Definition at line <a class="el" href="debugosc_8c-source.html#l00124">124</a> of file <a class="el" href="debugosc_8c-source.html">debugosc.c</a>.</p>

</div>
</div><p>
<a class="anchor" name="gddf4b54fc8fec7379b39dca13db2f309"></a><!-- doxytag: member="debugosc.c::Debug_SetUdp" ref="gddf4b54fc8fec7379b39dca13db2f309" args="(int state)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Debug_SetUdp           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>state</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets whether the Debug system is set to send its messages over UDP. 
<p>
This is enabled by default. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>state</em>&nbsp;</td><td>An integer specifying the state - 1 (on) or 0 (off). </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Zero on success.</dd></dl>
<dl class="user" compact><dt><b>Example</b></dt><dd><div class="fragment"><pre class="fragment">  <span class="comment">// Turn debugging over UDP off.</span>
  <a class="code" href="group___debug.html#gddf4b54fc8fec7379b39dca13db2f309" title="Sets whether the Debug system is set to send its messages over UDP.">Debug_SetUdp</a>( 0 );
</pre></div> </dd></dl>

<p>Definition at line <a class="el" href="debugosc_8c-source.html#l00214">214</a> of file <a class="el" href="debugosc_8c-source.html">debugosc.c</a>.</p>

</div>
</div><p>
<a class="anchor" name="g699ec173477cc72845e9c35d9c521dcb"></a><!-- doxytag: member="debugosc.c::Debug_SetUsb" ref="g699ec173477cc72845e9c35d9c521dcb" args="(int state)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Debug_SetUsb           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>state</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets whether the Debug subsystem outputs its OSC messages via USB. 
<p>
This is enabled by default. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>state</em>&nbsp;</td><td>An integer specifying whether or not to send over USB - 1 (on) or 0 (off). </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Zero on success.</dd></dl>
<dl class="user" compact><dt><b>Example</b></dt><dd><div class="fragment"><pre class="fragment">  <span class="comment">// Turn debugging over USB off.</span>
  <a class="code" href="group___debug.html#g699ec173477cc72845e9c35d9c521dcb" title="Sets whether the Debug subsystem outputs its OSC messages via USB.">Debug_SetUsb</a>( 0 );
</pre></div> </dd></dl>

<p>Definition at line <a class="el" href="debugosc_8c-source.html#l00176">176</a> of file <a class="el" href="debugosc_8c-source.html">debugosc.c</a>.</p>

</div>
</div><p>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Make Controller Kit</title>
<style type="text/css">
<!--
.footer {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9pt;
	color: #999999;
}
-->
</style>
</head>

<body>
<hr size="1">
<div>
  <p class="footer">The Make Controller Kit is an open source project maintained by <a href="http://www.makingthings.com">MakingThings</a>.<br />
    MakingThings code is released under the <a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">Apache 2.0 license</a>.<br />
    Bug tracker, development wiki and status can be found at <a href="http://dev.makingthings.com">http://dev.makingthings.com</a>.<br />
		This document was last updated on 5 Dec 2007.
</p>
</div>
<!-- Google Analytics Code -->
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-769030-1";
urchinTracker();
</script>
</body>
</html>
